<template>
	<view v-if="schedule">
		<view style="margin:10px 0;color:#888;">日程日期：{{schedule.date}}</view>
		<view>事件标题：{{schedule.title}}</view>
		<view>时间：{{schedule.time}}</view>
		<view>地点：{{schedule.location}}</view>
		<view>邮箱：{{schedule.email}}</view>
		<view v-for="(item, idx) in schedule.domains" :key="item.id">
			域名{{idx+1}}：{{item.value}}
		</view>
	</view>
	<view v-else>
		<view style="color:#888;">暂无该日程数据</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			schedule: null
		}
	},
	onLoad(options) {
		const date = options.date
		const schedules = uni.getStorageSync('schedules') || []
		this.schedule = schedules.find(item => item.date === date) || null
	}
}
</script>